package com.jusu.dao;

import java.lang.reflect.Array;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.session.SqlSession;

import com.jusu.entity.Shop;
import com.jusu.util.MyBatisUtil;

public class ShopDaoImpl extends BaseDaoImpl implements IShopDao {

	@Override
	public List<Shop> showByPage(int start, int end) {

		Map map = new HashMap<>();
		map.put("start", start);
		map.put("end", end);
		SqlSession session = MyBatisUtil.getSession();
		List<Shop> shopList = session.selectList("com.jusu.dao.IShopDao.showByPage",map);
		MyBatisUtil.closeSession(session);
		return shopList;
	}

	@Override
	public List<Shop> showByHot(HashMap map) {
	/*	Map map = new HashMap<>();
		map.put("start", start);
		map.put("end", end);*/
		/*SqlSession session = MyBatisUtil.getSession();
		List<Shop> shopList = session.selectList("com.jusu.dao.IShopDao.showByHot",map);
		MyBatisUtil.closeSession(session);*/
		return (List<Shop>) excute(map);
	}

	@Override
	public List<Shop> show(HashMap map) {
		
		return (List<Shop>) excute(map);
	}
}
